/**
 * Package	: com.coship.adstorm.job
 * File		: ADNotifyDisplayJob.java
 * Company 	: Shenzhen Coship Electronics CO., LTD.
 * Version  : v1.0
 * Description 	: <Detail Description for package>
 *
 * Copyright (c) 2003-2009 Shenzhen Coship Electronics CO., LTD.
 * Rainbow Bldg.,North,Hi-Tech Industrial Park,Nanshan District,Shenzhen,China,P.C.518057.
 * All rights reserved.
 * The contents of this file are confidential and proprietary to COSHIP.
 * Copying is explicitly prohibited without the express permission of COSHIP.
 *
 * Create Date	: May 4, 2010
 * Create By    : 904147
 * History :$
 */
package com.coship.vasms.adstorm.job;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;

import com.coship.vasms.adstorm.webservice.advertise.AdvertiseNotifyDisplayReqStub;
import com.coship.vasms.adstorm.webservice.advertise.InitDisplayReq;

/** 
 * 
 * File Name    : ADNotifyDisplayJob.java
 * @Description 	: <Detail Description for Class >
 * @author 904147
 */
public class ADNotifyDisplayJob extends InitDisplayReq implements StatefulJob {
	/**
	 * Description 	: <Detail Description for package>
	 * Author       : 904147
	 */
	private static final long serialVersionUID = 1L;
	private static Logger logger = Logger
		.getLogger(ADNotifyDisplayJob.class);
	
	@Override
	public void execute(JobExecutionContext arg0) throws JobExecutionException {
		// TODO Auto-generated method stub
		logger.debug("ͨ��ͣ����ʱ������");
		try{
			//��ʼ��
			init();
			
			for(int i=0;i<pages;i++){
				Integer pageStart = getPageStart(pageNo);
				AdvertiseNotifyDisplayReqStub anprs = new AdvertiseNotifyDisplayReqStub(arrangeNotifyService, pageStart, pageSize);
				anprs.notifyDisplayAdvertise();
				pageNo++;
			}
		}catch(Exception e){
			logger.info("");
		}
	}
}
